package com.link.base.core.basic.util.datax;

/**
 * @author 何启谦
 * @date 2019/4/1
 */
public class FieldMapping {
    /** 临时表字段 */
    private String tempTableField;
    /** 正式表字段 */
    private String targetTableField;
    /** 字段类型 */
    private String fieldType;
    /** 正式表字段是否必输 */
    private boolean required = false;
    /** 是否允许更新 */
    private boolean updateFlag = true;


    public FieldMapping(String tempTableField, String targetTableField, String fieldType) {
        this.tempTableField = tempTableField;
        this.targetTableField = targetTableField;
        this.fieldType = fieldType;
    }

    public String getTempTableField() {
        return tempTableField;
    }

    public void setTempTableField(String tempTableField) {
        this.tempTableField = tempTableField;
    }

    public String getTargetTableField() {
        return targetTableField;
    }

    public void setTargetTableField(String targetTableField) {
        this.targetTableField = targetTableField;
    }

    public String getFieldType() {
        return fieldType;
    }

    public void setFieldType(String fieldType) {
        this.fieldType = fieldType;
    }

    public boolean isRequired() {
        return required;
    }

    public FieldMapping setRequired(boolean required) {
        this.required = required;
        return this;
    }

    public boolean isUpdateFlag() {
        return updateFlag;
    }

    public FieldMapping setUpdateFlag(boolean updateFlag) {
        this.updateFlag = updateFlag;
        return this;
    }
}
